home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 11050 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.3 KB

  1. Path: swidir.switch.ch!epflnews!news
  2. From: Niels Hilbrink <niels@imacsg2.epfl.ch>
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: Q: how to create an Object without creating the whole object
  5. Date: Tue, 12 Mar 1996 14:59:29 +0100
  6. Organization: EPFL
  7. Message-ID: <31458341.794B@imacsg2.epfl.ch>
  8. References: <31454EC9.167E@imacsg2.epfl.ch>
  9. NNTP-Posting-Host: imacsg2.epfl.ch
  10. Mime-Version: 1.0
  11. Content-Type: text/plain; charset=us-ascii
  12. Content-Transfer-Encoding: 7bit
  13. X-Mailer: Mozilla 2.0 (X11; I; IRIX 5.3 IP22)
  14.  
  15. hmm Sorry to waste presious webspace but I found My answer
  16. > something like:
  17. >         Aobj = (A*) new A::B()
  18. > But this doen't work, can anybody tell me what will ?
  19. > oh yeah this works of course :
  20. >         Bobj = new B;
  21. >         Aobj = (A*) Bobj;
  22.  
  23.  
  24.     Aobj = (A*) new B
  25.  
  26.  
  27.  
  28. -- 
  29.  
  30.    The most overlooked advantage to owning a computer is 
  31.    that if they foul up there's no law against wacking   
  32.    them around a little.                                 
  33.  
  34. ------------------------------------------------------------
  35. Koen D'Hondt                          Niels Hilbrink
  36. koen@dutlhs1.lr.tudelft.nl      niels@dutlcc3.lr.tudelft.nl
  37.  
  38. **** Ripley Software Development ****
  39. (finger niels@dutlcc3.lr.tudelft.nl for more information.)
  40. ------------------------------------------------------------
  41.